(0) Obligation:

Clauses:

star(X1, []).
star(.(X, U), .(X, W)) :- ','(app(U, V, W), star(.(X, U), W)).
app([], L, L).
app(.(X, L), M, .(X, N)) :- app(L, M, N).

Query: star(g,g)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

appB(.(X1, X2), X3, .(X1, X4)) :- appB(X2, X3, X4).
starA(.(X1, []), .(X1, X2)) :- starA(.(X1, []), X2).
starA(.(X1, .(X2, X3)), .(X1, .(X2, X4))) :- appB(X3, X5, X4).
starA(.(X1, .(X2, X3)), .(X1, .(X2, X4))) :- ','(appcB(X3, X5, X4), starA(.(X1, .(X2, X3)), .(X2, X4))).

Clauses:

starcA(X1, []).
starcA(.(X1, []), .(X1, X2)) :- starcA(.(X1, []), X2).
starcA(.(X1, .(X2, X3)), .(X1, .(X2, X4))) :- ','(appcB(X3, X5, X4), starcA(.(X1, .(X2, X3)), .(X2, X4))).
appcB([], X1, X1).
appcB(.(X1, X2), X3, .(X1, X4)) :- appcB(X2, X3, X4).

Afs:

starA(x1, x2)  =  starA(x1, x2)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
starA_in: (b,b)
appB_in: (b,f,b)
appcB_in: (b,f,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(X1, []), .(X1, X2)) → U2_GG(X1, X2, starA_in_gg(.(X1, []), X2))
STARA_IN_GG(.(X1, []), .(X1, X2)) → STARA_IN_GG(.(X1, []), X2)
STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → U3_GG(X1, X2, X3, X4, appB_in_gag(X3, X5, X4))
STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → APPB_IN_GAG(X3, X5, X4)
APPB_IN_GAG(.(X1, X2), X3, .(X1, X4)) → U1_GAG(X1, X2, X3, X4, appB_in_gag(X2, X3, X4))
APPB_IN_GAG(.(X1, X2), X3, .(X1, X4)) → APPB_IN_GAG(X2, X3, X4)
STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → U4_GG(X1, X2, X3, X4, appcB_in_gag(X3, X5, X4))
U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → U5_GG(X1, X2, X3, X4, starA_in_gg(.(X1, .(X2, X3)), .(X2, X4)))
U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → STARA_IN_GG(.(X1, .(X2, X3)), .(X2, X4))

The TRS R consists of the following rules:

appcB_in_gag([], X1, X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), X3, .(X1, X4)) → U10_gag(X1, X2, X3, X4, appcB_in_gag(X2, X3, X4))
U10_gag(X1, X2, X3, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The argument filtering Pi contains the following mapping:
starA_in_gg(x1, x2)  =  starA_in_gg(x1, x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
appB_in_gag(x1, x2, x3)  =  appB_in_gag(x1, x3)
appcB_in_gag(x1, x2, x3)  =  appcB_in_gag(x1, x3)
appcB_out_gag(x1, x2, x3)  =  appcB_out_gag(x1, x2, x3)
U10_gag(x1, x2, x3, x4, x5)  =  U10_gag(x1, x2, x4, x5)
STARA_IN_GG(x1, x2)  =  STARA_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x1, x2, x3)
U3_GG(x1, x2, x3, x4, x5)  =  U3_GG(x1, x2, x3, x4, x5)
APPB_IN_GAG(x1, x2, x3)  =  APPB_IN_GAG(x1, x3)
U1_GAG(x1, x2, x3, x4, x5)  =  U1_GAG(x1, x2, x4, x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x1, x2, x3, x4, x5)
U5_GG(x1, x2, x3, x4, x5)  =  U5_GG(x1, x2, x3, x4, x5)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(X1, []), .(X1, X2)) → U2_GG(X1, X2, starA_in_gg(.(X1, []), X2))
STARA_IN_GG(.(X1, []), .(X1, X2)) → STARA_IN_GG(.(X1, []), X2)
STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → U3_GG(X1, X2, X3, X4, appB_in_gag(X3, X5, X4))
STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → APPB_IN_GAG(X3, X5, X4)
APPB_IN_GAG(.(X1, X2), X3, .(X1, X4)) → U1_GAG(X1, X2, X3, X4, appB_in_gag(X2, X3, X4))
APPB_IN_GAG(.(X1, X2), X3, .(X1, X4)) → APPB_IN_GAG(X2, X3, X4)
STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → U4_GG(X1, X2, X3, X4, appcB_in_gag(X3, X5, X4))
U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → U5_GG(X1, X2, X3, X4, starA_in_gg(.(X1, .(X2, X3)), .(X2, X4)))
U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → STARA_IN_GG(.(X1, .(X2, X3)), .(X2, X4))

The TRS R consists of the following rules:

appcB_in_gag([], X1, X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), X3, .(X1, X4)) → U10_gag(X1, X2, X3, X4, appcB_in_gag(X2, X3, X4))
U10_gag(X1, X2, X3, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The argument filtering Pi contains the following mapping:
starA_in_gg(x1, x2)  =  starA_in_gg(x1, x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
appB_in_gag(x1, x2, x3)  =  appB_in_gag(x1, x3)
appcB_in_gag(x1, x2, x3)  =  appcB_in_gag(x1, x3)
appcB_out_gag(x1, x2, x3)  =  appcB_out_gag(x1, x2, x3)
U10_gag(x1, x2, x3, x4, x5)  =  U10_gag(x1, x2, x4, x5)
STARA_IN_GG(x1, x2)  =  STARA_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x1, x2, x3)
U3_GG(x1, x2, x3, x4, x5)  =  U3_GG(x1, x2, x3, x4, x5)
APPB_IN_GAG(x1, x2, x3)  =  APPB_IN_GAG(x1, x3)
U1_GAG(x1, x2, x3, x4, x5)  =  U1_GAG(x1, x2, x4, x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x1, x2, x3, x4, x5)
U5_GG(x1, x2, x3, x4, x5)  =  U5_GG(x1, x2, x3, x4, x5)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 5 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPB_IN_GAG(.(X1, X2), X3, .(X1, X4)) → APPB_IN_GAG(X2, X3, X4)

The TRS R consists of the following rules:

appcB_in_gag([], X1, X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), X3, .(X1, X4)) → U10_gag(X1, X2, X3, X4, appcB_in_gag(X2, X3, X4))
U10_gag(X1, X2, X3, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
appcB_in_gag(x1, x2, x3)  =  appcB_in_gag(x1, x3)
appcB_out_gag(x1, x2, x3)  =  appcB_out_gag(x1, x2, x3)
U10_gag(x1, x2, x3, x4, x5)  =  U10_gag(x1, x2, x4, x5)
APPB_IN_GAG(x1, x2, x3)  =  APPB_IN_GAG(x1, x3)

We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPB_IN_GAG(.(X1, X2), X3, .(X1, X4)) → APPB_IN_GAG(X2, X3, X4)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPB_IN_GAG(x1, x2, x3)  =  APPB_IN_GAG(x1, x3)

We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPB_IN_GAG(.(X1, X2), .(X1, X4)) → APPB_IN_GAG(X2, X4)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APPB_IN_GAG(.(X1, X2), .(X1, X4)) → APPB_IN_GAG(X2, X4)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → U4_GG(X1, X2, X3, X4, appcB_in_gag(X3, X5, X4))
U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → STARA_IN_GG(.(X1, .(X2, X3)), .(X2, X4))

The TRS R consists of the following rules:

appcB_in_gag([], X1, X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), X3, .(X1, X4)) → U10_gag(X1, X2, X3, X4, appcB_in_gag(X2, X3, X4))
U10_gag(X1, X2, X3, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
appcB_in_gag(x1, x2, x3)  =  appcB_in_gag(x1, x3)
appcB_out_gag(x1, x2, x3)  =  appcB_out_gag(x1, x2, x3)
U10_gag(x1, x2, x3, x4, x5)  =  U10_gag(x1, x2, x4, x5)
STARA_IN_GG(x1, x2)  =  STARA_IN_GG(x1, x2)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x1, x2, x3, x4, x5)

We have to consider all (P,R,Pi)-chains

(15) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → U4_GG(X1, X2, X3, X4, appcB_in_gag(X3, X4))
U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → STARA_IN_GG(.(X1, .(X2, X3)), .(X2, X4))

The TRS R consists of the following rules:

appcB_in_gag([], X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), .(X1, X4)) → U10_gag(X1, X2, X4, appcB_in_gag(X2, X4))
U10_gag(X1, X2, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The set Q consists of the following terms:

appcB_in_gag(x0, x1)
U10_gag(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(17) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule STARA_IN_GG(.(X1, .(X2, X3)), .(X1, .(X2, X4))) → U4_GG(X1, X2, X3, X4, appcB_in_gag(X3, X4)) we obtained the following new rules [LPAR04]:

STARA_IN_GG(.(z0, .(z0, z2)), .(z0, .(z0, x3))) → U4_GG(z0, z0, z2, x3, appcB_in_gag(z2, x3))

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → STARA_IN_GG(.(X1, .(X2, X3)), .(X2, X4))
STARA_IN_GG(.(z0, .(z0, z2)), .(z0, .(z0, x3))) → U4_GG(z0, z0, z2, x3, appcB_in_gag(z2, x3))

The TRS R consists of the following rules:

appcB_in_gag([], X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), .(X1, X4)) → U10_gag(X1, X2, X4, appcB_in_gag(X2, X4))
U10_gag(X1, X2, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The set Q consists of the following terms:

appcB_in_gag(x0, x1)
U10_gag(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(19) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule U4_GG(X1, X2, X3, X4, appcB_out_gag(X3, X5, X4)) → STARA_IN_GG(.(X1, .(X2, X3)), .(X2, X4)) we obtained the following new rules [LPAR04]:

U4_GG(z0, z0, z1, z2, appcB_out_gag(z1, x4, z2)) → STARA_IN_GG(.(z0, .(z0, z1)), .(z0, z2))

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(z0, .(z0, z2)), .(z0, .(z0, x3))) → U4_GG(z0, z0, z2, x3, appcB_in_gag(z2, x3))
U4_GG(z0, z0, z1, z2, appcB_out_gag(z1, x4, z2)) → STARA_IN_GG(.(z0, .(z0, z1)), .(z0, z2))

The TRS R consists of the following rules:

appcB_in_gag([], X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), .(X1, X4)) → U10_gag(X1, X2, X4, appcB_in_gag(X2, X4))
U10_gag(X1, X2, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The set Q consists of the following terms:

appcB_in_gag(x0, x1)
U10_gag(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(21) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


STARA_IN_GG(.(z0, .(z0, z2)), .(z0, .(z0, x3))) → U4_GG(z0, z0, z2, x3, appcB_in_gag(z2, x3))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x1 + x2   
POL(STARA_IN_GG(x1, x2)) = x2   
POL(U10_gag(x1, x2, x3, x4)) = 0   
POL(U4_GG(x1, x2, x3, x4, x5)) = 1 + x1 + x4   
POL([]) = 0   
POL(appcB_in_gag(x1, x2)) = 0   
POL(appcB_out_gag(x1, x2, x3)) = 0   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:
none

(22) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U4_GG(z0, z0, z1, z2, appcB_out_gag(z1, x4, z2)) → STARA_IN_GG(.(z0, .(z0, z1)), .(z0, z2))

The TRS R consists of the following rules:

appcB_in_gag([], X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), .(X1, X4)) → U10_gag(X1, X2, X4, appcB_in_gag(X2, X4))
U10_gag(X1, X2, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The set Q consists of the following terms:

appcB_in_gag(x0, x1)
U10_gag(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(23) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(24) TRUE

(25) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(X1, []), .(X1, X2)) → STARA_IN_GG(.(X1, []), X2)

The TRS R consists of the following rules:

appcB_in_gag([], X1, X1) → appcB_out_gag([], X1, X1)
appcB_in_gag(.(X1, X2), X3, .(X1, X4)) → U10_gag(X1, X2, X3, X4, appcB_in_gag(X2, X3, X4))
U10_gag(X1, X2, X3, X4, appcB_out_gag(X2, X3, X4)) → appcB_out_gag(.(X1, X2), X3, .(X1, X4))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
appcB_in_gag(x1, x2, x3)  =  appcB_in_gag(x1, x3)
appcB_out_gag(x1, x2, x3)  =  appcB_out_gag(x1, x2, x3)
U10_gag(x1, x2, x3, x4, x5)  =  U10_gag(x1, x2, x4, x5)
STARA_IN_GG(x1, x2)  =  STARA_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains

(26) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(27) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(X1, []), .(X1, X2)) → STARA_IN_GG(.(X1, []), X2)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(28) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(29) Obligation:

Q DP problem:
The TRS P consists of the following rules:

STARA_IN_GG(.(X1, []), .(X1, X2)) → STARA_IN_GG(.(X1, []), X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(30) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • STARA_IN_GG(.(X1, []), .(X1, X2)) → STARA_IN_GG(.(X1, []), X2)
    The graph contains the following edges 1 >= 1, 2 > 2

(31) YES